<!doctype html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<title>华北空管局培训中心教学管理系统</title>
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="./static/css/font.css">
		<link rel="stylesheet" href="./static/css/weadmin.css">
		<link rel="stylesheet" href="static/css/index.css" />
		<script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>

	</head>

	<body>
		<!-- 顶部开始 -->
		<div class="container">
			<div class="logo">
				<a href="./index.html">华北空管局培训中心教学管理系统</a>
				<!--民航华北空管局后台管理-->
			</div>
			<div class="left_open">
				<i title="展开左侧栏" class="iconfont">&#xe699;</i>
			</div>
			<ul class="layui-nav layui-layout-right" lay-filter="">
				<li class="layui-nav-item">
					<span class="layui-badge-dot"></span>
					<a href="javascript:;">个人管理中心</a>
					<dl class="layui-nav-child">
						<!-- 二级菜单 -->
						<dd>
							<a onclick="WeAdminShow('个人信息','studentInfo.html')" class="personInfo">个人信息</a>
						</dd>
						<dd>
							<a class="layui-btn" href="#" id="loginOut">退出</a>
						</dd>
					</dl>
				</li>
			</ul>

		</div>
		<!-- 顶部结束 -->
		<!-- 中部开始 -->
		<!-- 左侧菜单开始 -->
		<div class="left-nav">
			<div id="side-nav" class="layui-anim-upbit">
				<ul id="nav">
				
				</ul>
			</div>
		</div>
		<!-- 左侧菜单结束 -->
		<!-- 右侧主体开始 -->
		<div class="page-content">
			<div class="layui-tab tab" lay-filter="wenav_tab" id="WeTabTip" lay-allowclose="true">
				<ul class="layui-tab-title" id="tabName">
					<li>欢迎来到华北空管局培训中心教学管理系统</li>
				</ul>
				<div class="layui-tab-content">
					<div class="layui-tab-item layui-show">
						<iframe src='defaultpage.html' frameborder="0" scrolling="yes" class="weIframe"></iframe>
					</div>
				</div>
			</div>
		</div>
		<div class="page-content-bg"></div>
		<!-- 右侧主体结束 -->
		<!-- 中部结束 -->
		<!-- 底部开始 -->
		<div class="footer">
			<div class="copyright">Copyright ©2018东港集团</div>
		</div>
		<!-- 底部结束 -->
		<script src="static/js/jquery.1.11.1.js"></script>
		<script src="static/js/public.js" type="text/javascript" charset="utf-8"></script>
		<script src="static/js/index.js"></script>
		<script>
			$(function() {
				var totalMenus=sessionStorage.getItem('totalMenus');
				totalMenus=JSON.parse(totalMenus);
				function compare(property) {
					return function(a, b) {
						var value1 = a[property];
						var value2 = b[property];
						return value1 - value2;
					}
				}

				//排序后的菜单
				var sortedMenu = totalMenus.sort(compare('id'));

				var length = sortedMenu.length;
				//遍历动态菜单
				for(var i = 0; i < length; i++) {
					if(sortedMenu[i].childs.length == 0) {
						$li = $("<li></li>");
						
						var $navMenu = $(
							"<a " + "_href=" + sortedMenu[i].menuUrl + ">" +
							"<i class='layui-icon layui-icon-home'  style='color:#FFB800;' style ='display：inline-block'></i>" +
							"<cite class='jichu'>" + sortedMenu[i].menuName + "</cite>" +
							"<i class='iconfont'>"+sortedMenu[i].icon+"</i>" + "</a>"
						);
						$li.append($navMenu);
						$("#nav").append($li);
					} else {
						//父
						
						$li = $("<li></li>");
						var $navMenu = $(
							"<a _href=" + sortedMenu[i].menuUrl + ">" +
								"<i class='layui-icon' style='color:#FFB800;' style ='display：inline-block'>"+sortedMenu[i].icon+"</i>" +
								"<cite class='jichu'>" + sortedMenu[i].menuName + "</cite>" +
								"<i class='iconfont'>&#xe6a7;</i>" +
							"</a>"
						);
						$li.append($navMenu);
						//子
						var $ul = $("<ul class='sub-menu'></ul>");
						for(var j = 0; j < sortedMenu[i].childs.length; j++) {

							var $ulLi = $(
								"<li>" +
									"<a _href=" + sortedMenu[i].childs[j].menuUrl + ">" +
									"<i class='iconfont'>" + sortedMenu[i].childs[j].icon + "</i>" +
									"<cite>" + sortedMenu[i].childs[j].menuName + "</cite>" +
									"</a>" +
								"</li>");
							$ul.append($ulLi);
						}

						$li.append($ul);
						$("#nav").append($li);
					}
				}

				function encapsulationNoDrop(menuList) {
					var $navMenu = $("<li>" +
						"<a" + "_href=" + menuList.menuUrl + ">" +
						"<i class='layui-icon layui-icon-home'></i>" +
						"<cite class='jichu'>" + menuList.menuName + "</cite>" +
						"<i class='iconfont'>&#xe6a7;</i>" +
						"</a>" +
						"</li>");
					$("#nav").append($navMenu);

				}

				function encapsulationHaveDrop(menuList) {
					$navMenu = $(
						"<a href='javascript:;'>" +
						"<i class='iconfont' style='color:#FFB800;'>&#xe723;</i>" +
						"<cite class='jichu'>" + menuList.menuName + "</cite>" +
						"<i class='iconfont'>&#xe6a7;</i>" +
						"</a>" +

						//					二级

						"<ul class='sub-menu'>" +
						"<li>" +
						"<a _href='./pages/canc-studentsRecord/studentTheoryRecord.html'>" +
						"<i class='iconfont'>&#xe6a7;</i>" +
						"<cite>理论课培训记录</cite>" +
						"</a>" +
						"</li>" +
						"<li>" +
						"<a _href='./pages/canc-studentsRecord/studentMachingRecord.html'>" +
						"<i class='iconfont'>&#xe6a7;</i>" +
						"<cite>实操课培训记录</cite>" +
						"</a>" +
						"</li>" +

						"	</ul>"

					)
					$("#nav").append($navMenu);
				}

				//菜单逻辑部分结束1216

			})
		</script>
	</body>

</html>